//
//  BaseViewController.m
//  YJJ0
//
//  Created by dadaxueche on 16/6/21.
//  Copyright © 2016年 王—wagn. All rights reserved.
//

#import "BaseViewController.h"
#import <SVProgressHUD.h>
@interface BaseViewController ()

@end

@implementation BaseViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self setupProperty];
}

-(void)setupProperty{
    //统一初始化的地方(不包括 lazy,init的)
}
-(void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    [UIView setAnimationsEnabled:YES];
    
    
}

-(void)viewWillDisappear:(BOOL)animated{
    [super viewWillDisappear: animated];
    [[NSNotificationCenter defaultCenter] postNotificationName:KUIViewControllerDisappearEvent object:nil];
    
}

-(void)viewDidDisappear:(BOOL)animated{
    [super viewDidDisappear:animated];
    _isAnimation = NO;
}

-(void)viewDidAppear:(BOOL)animated{
    [super viewDidAppear:animated];
    _isAnimation = NO;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

-(void)presentYJJViewControllerInNav:(BaseViewController *)vc animated:(BOOL)animated completion:(void (^)(void))completion{
    UINavigationController *navi = [[BaseNavigationVC alloc] initWithRootViewController:vc];
    [self presentViewController:navi animated:YES completion:^{
        //
    }];

}

- (BOOL)prefersStatusBarHidden {
    return _hiddenTimeState;
}

- (UIStatusBarAnimation)preferredStatusBarUpdateAnimation {
    return UIStatusBarAnimationNone;
}

@end
